Skip to content

feat: add renameAdversary(id:name:) to EncounterSession#23

Merged
gwillish merged 1 commit into
mainfrom
feat/rename-adversary
Apr 11, 2026
Merged

feat: add renameAdversary(id:name:) to EncounterSession#23
gwillish merged 1 commit into
mainfrom
feat/rename-adversary

Conversation

@gwillish
Copy link
Copy Markdown
Owner

Summary

  • Adds renameAdversary(id:name:) -> Bool to EncounterSession
  • Trims whitespace; rejects empty names and names already used as customName by another slot in the session
  • Returns false without mutating state on any failure; @discardableResult for call sites that don't need the result

Notes

Test plan

  • All 177 existing tests still pass (swift test)

Allows the runner UI to rename a slot mid-encounter. Validates that the
trimmed name is non-empty and unique across all slots (by customName);
returns false without mutating state on failure.
@gwillish gwillish merged commit 1d75544 into main Apr 11, 2026
2 checks passed
@gwillish gwillish deleted the feat/rename-adversary branch April 11, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant